import request from './request.js'

export function getDjRecommend () {
  return request.get('/dj/recommend')
}

export function getDjProgram () {
  return request.get('/personalized/djprogram')
}

export function getDjPersonalizeRecommend () {
  return request.get('/dj/personalize/recommend')
}

export function getDjBaner () {
  return request.get('/dj/banner')
}

export function getDjCateList () {
  return request.get('/dj/catelist')
}

export function getProgramRankingList () {
  return request.get('/dj/program/toplist')
}

export function getNewOrHotRankingList (type) {
  return request.get('/dj/toplist', {
    params: {
      limit: 100,
      offset: 0,
      type: type
    }
  })
}

export function getTypeRecommend (type) {
  return request.get('/dj/recommend/type', {
    params: {
      type: type
    }
  })
}

export function getProgramDetail (id) {
  return request.get('/dj/program/detail', {
    params: {
      id: id
    }
  })
}

export function getDjDetail (id) {
  return request.get('/dj/detail', {
    params: {
      rid: id
    }
  })
}

export function getProgram (rid) {
  return request.get('/dj/program', {
    params: {
      rid: rid,
      limit: 50,
      offset: 0,
      asc: false
    }
  })
}

export function getDjPayList (limit) {
  return request.get('/dj/toplist/pay', {
    params: {
      limit: limit
    }
  })
}

export function getDjPaygiftList (limit) {
  return request.get('/dj/paygift', {
    params: {
      limit: limit,
      offset: 0
    }
  })
}

export function getHotDj (cateId) {
  return request.get('/dj/radio/hot', {
    params: {
      limit: 50,
      offset: 0,
      cateId: cateId
    }
  })
}
